/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.opgea.token.domain.entities;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * 
 * @author Ramesh
 */
@Entity
@Table(name = "smsserver_calls")
@XmlRootElement
@NamedQueries({
	@NamedQuery(name = "SmsServerCalls.findAll", query = "SELECT s FROM SmsServerCalls s"),
	@NamedQuery(name = "SmsServerCalls.findById", query = "SELECT s FROM SmsServerCalls s WHERE s.id = :id"),
	@NamedQuery(name = "SmsServerCalls.findByCallDate", query = "SELECT s FROM SmsServerCalls s WHERE s.callDate = :callDate"),
	@NamedQuery(name = "SmsServerCalls.findByGatewayId", query = "SELECT s FROM SmsServerCalls s WHERE s.gatewayId = :gatewayId"),
	@NamedQuery(name = "SmsServerCalls.findByCallerId", query = "SELECT s FROM SmsServerCalls s WHERE s.callerId = :callerId") })
public class SmsServerCalls implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "call_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date callDate;
    @Basic(optional = false)
    @Column(name = "gateway_id")
    private String gatewayId;
    @Basic(optional = false)
    @Column(name = "caller_id")
    private String callerId;

    public SmsServerCalls() {
    }

    public SmsServerCalls(Integer id) {
	this.id = id;
    }

    public SmsServerCalls(Integer id, Date callDate, String gatewayId,
	    String callerId) {
	this.id = id;
	this.callDate = callDate;
	this.gatewayId = gatewayId;
	this.callerId = callerId;
    }

    public Integer getId() {
	return id;
    }

    public void setId(Integer id) {
	this.id = id;
    }

    public Date getCallDate() {
	return callDate;
    }

    public void setCallDate(Date callDate) {
	this.callDate = callDate;
    }

    public String getGatewayId() {
	return gatewayId;
    }

    public void setGatewayId(String gatewayId) {
	this.gatewayId = gatewayId;
    }

    public String getCallerId() {
	return callerId;
    }

    public void setCallerId(String callerId) {
	this.callerId = callerId;
    }

    @Override
    public int hashCode() {
	int hash = 0;
	hash += (id != null ? id.hashCode() : 0);
	return hash;
    }

    @Override
    public boolean equals(Object object) {
	if (!(object instanceof SmsServerCalls)) {
	    return false;
	}
	SmsServerCalls other = (SmsServerCalls) object;
	if ((this.id == null && other.id != null)
		|| (this.id != null && !this.id.equals(other.id))) {
	    return false;
	}
	return true;
    }

    @Override
    public String toString() {
	return "com.opgea.qms.domain.entities.generated.SmsServerCalls[ id="
		+ id + " ]";
    }

}
